package com.ruoyi.system.controller;

import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SmartDistribution;
import com.ruoyi.system.service.ISmartDistributionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 产品注册Controller
 * 
 * @author tianxingxia
 * @date 2025-02-07
 */
@RestController
@RequestMapping("/system/smartdistribution")
public class SmartDistributionController extends BaseController
{
    @Autowired
    private ISmartDistributionService smartDistributionService;


    /**
     * 查询产品注册列表
     */
//    @Anonymous
////    @PreAuthorize("@ss.hasPermi('system:smartdistribution:list')")
//    @DataSource(value = DataSourceType.BAISONE3)
//    @GetMapping("/daleilist")
//    public TableDataInfo Daleilist(DaLei smartdistribution) {
//        // startPage();
//        List<DaLei> list = smartDistributionService.selectDaLeiList(dalei);
//        return getDataTable(list);
//    }

    /**
     * 查询产品注册列表
     */
    @Anonymous
//    @PreAuthorize("@ss.hasPermi('system:smartdistribution:list')")
    @DataSource(value = DataSourceType.BAISONE3)
    @GetMapping("/list")
    public TableDataInfo list(SmartDistribution smartdistribution)
    {
        startPage();
        List<SmartDistribution> list = smartDistributionService.selectSmartDistributionList(smartdistribution);
        return getDataTable(list);
    }


}
